1. Field of the Invention
The present invention relates to an apparatus, a method, and a non-transitory computer-readable medium.
2. Description of the Related Art
A technique of automatically insetting an image into a slot of a template and completing a layout image has recently been known in photo printing or video clip creation software. There also exists a technique of, in a template to arrange an image in a layout frame, automatically performing trimming based on the region of the main object of the image to prevent the main object from being partially placed off the layout frame.
Japanese Patent Laid-Open No. 2007-26246 has the following arrangement. A main object region set on a still image and a point of interest for deciding the center of the main object are set. In a layout frame, a reference point that is made to match the point of interest when insetting the still image is set. The ratio of the distance from the reference point to the layout frame to that from the point of interest to the outline of the still image is obtained. The maximum value of the ratio is defined as a first parameter. In addition, the ratio of the distance from the reference point to the layout frame to that from the point of interest to the outline of the main object region is obtained. The minimum value of the ratio is defined as a second parameter. When the first parameter is larger than the second parameter, a blank region issues, or the main object is placed off the album image. Hence, inset of the still image is prohibited.
Japanese Patent Laid-Open No. 2007-26246 describes a technique of automatically deciding the trimming position in consideration of the position of a region of interest such as a person. In this technique, however, the region of interest is sometimes unable to fit in the arrangement region well. For example, a problem may arise when all of a plurality of regions of interest in an image are arranged in arrangement regions such as layout frames (slots) having a fixed aspect ratio. Reference numeral 3401 shown in FIG. 29 denotes a slot (layout frame) to trim and arrange an image; and reference numeral 3402 denotes an image. Reference numerals 3403 (inside the broken line portion) and 3404 (inside the Broken line portion) in the image 3402 denote regions of interest. If all the regions of interest are arranged in the slot 3401 without margins, an image as indicated by reference numeral 3406 is obtained. In image 3406, a cutoff(partial loss) issues in each of the regions 3403 and 3404 of interest so the arrangement does not look fine. Especially when the cutoff issues in a face region, the layout may differ from the user's requirement because, for example, the facial expression is unrecognizable, or the key figure of the photo is unnoticeable.